import request from '@/utils/request'

// 查询库区列表
export function listStoreArea(query) {
  return request({
    url: '/wms/storeArea/list',
    method: 'get',
    params: query
  })
}

// 查询库区列表
export function storeAreas(query) {
  return request({
    url: '/wms/storeArea/storeAreas',
    method: 'get',
    params: query
  })
}

// 查询库区列表
export function storeAreasTree(query) {
  return request({
    url: '/wms/storeArea/storeAreasTree',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/wms/storeArea/initBean',
        method: 'post'
    })
}

// 查询库区详细
export function getStoreArea(id) {
  return request({
    url: '/wms/storeArea/' + id,
    method: 'get'
  })
}

// 新增库区
export function addStoreArea(data) {
  return request({
    url: '/wms/storeArea',
    method: 'post',
    data: data
  })
}

// 修改库区
export function updateStoreArea(data) {
  return request({
    url: '/wms/storeArea',
    method: 'put',
    data: data
  })
}

// 删除库区
export function delStoreArea(id) {
  return request({
    url: '/wms/storeArea/' + id,
    method: 'delete'
  })
}
